import os

from django.conf import settings
from django.core.files.storage import Storage

# 1. 定义自己的文件存储类，改写其url方法
class FastDFSStorage(Storage):
    def url(self, name):
        return os.path.join(settings.FDFS_BASE_URL, name)
